package com.itlong.cloud.propertyapp.dao;

import com.itlong.cloud.POJO.DTO.app.property.app.PropertyAppInspectDTO;
import com.itlong.cloud.POJO.PO.PropertyInspectPointInfoPO;
import com.itlong.cloud.POJO.VO.app.property.app.PropertyAppInspectLineInfoVO;
import com.itlong.cloud.POJO.VO.app.property.app.PropertyAppInspectRecordDetailVO;
import com.itlong.cloud.POJO.VO.app.property.app.PropertyAppInspectInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      物业APP巡检模块数据访问接口
 * </desc>
 *
 * @createDate2020/1/7
 **/

@Mapper
@Repository
public interface IPropertyAppInspectDao {

    /**
    * <desc>
    *       获取巡检列表
    * </desc>
    *
    * @param userId
    * @param projectId
    * @return
    * @Author Zhu.yj
    * @createDate  2020/1/7
    */
    List<PropertyAppInspectInfoVO> getInspectPlanList(@Param("userId") String userId, @Param("projectId") String projectId);

    /**
     * <desc>
     *      保存操作
     * </desc>
     *
     * @param params 保存参数
     * @return
     * @Author Zhu.yj
     * @createDate  2020/1/7
     */
    Integer save(Map<String, Object> params);

    /**
     * <desc>
     *      根据巡检点编号获取巡检点信息
     * </desc>
     *
     * @return 巡检点信息
     * @author wangzhi
     * @createDate 2020/01/08
     */
    PropertyInspectPointInfoPO getInspectPointByNum(PropertyAppInspectDTO propertyAppInspectDTO);

    /**
     * <desc>
     *      查询对应巡检计划id的巡检记录的去重后的时间，精确到日期
     * </desc>
     *
     * @return 巡检记录日期
     * @author wangzhi
     * @createDate 2020/02/17
     */
    List<Map<String, String>> getInspectDateByInspectPlanId(PropertyAppInspectDTO propertyAppInspectDTO);

    /**
     * <desc>
     *      查询巡检记录月视图详情
     * </desc>
     *
     * @return 巡检记录月视图详情
     * @author wangzhi
     * @createDate 2020/02/17
     */
    List<PropertyAppInspectRecordDetailVO> getInspectRecordDetail(PropertyAppInspectDTO propertyAppInspectDTO);

    /**
     * <desc>
     *      获取巡检路线列表
     * </desc>
     *
     * @param params 查询参数
     * @return
     * @Author Zhu.yj
     * @createDate  2020/4/2
     */
    List<PropertyAppInspectLineInfoVO> getInspectLineList(Map<String, Object> params);

    /**
     * <desc>
     *      获取巡检点列表
     * </desc>
     *
     * @param params 查询参数
     * @return
     * @Author Zhu.yj
     * @createDate  2020/4/2
     */
    List<String> getInspectPointList(Map<String,Object> params);
}
